import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '宝贝名字',
    align: "center",
    dataIndex: 'bbName'
  },
  {
    title: '宝贝性别',
    align: "center",
    dataIndex: 'sex_dictText'
  },
  {
    title: '出生日期',
    align: "center",
    dataIndex: 'birthDate',
    customRender:({text}) =>{
      text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
      return text;
    },
  },
  {
    title: '联系电话',
    align: "center",
    dataIndex: 'phone'
  },
  {
    title: '宝贝年龄',
    align: "center",
    dataIndex: 'ageInMonths'
  },
  {
    title: '家庭住址',
    align: "center",
    dataIndex: 'address'
  },
  {
    title: '备注',
    align: "center",
    dataIndex: 'remark'
  },
];

// 高级查询数据
export const superQuerySchema = {
  bbName: {title: '宝贝名字',order: 0,view: 'text', type: 'string',},
  sex: {title: '宝贝性别',order: 1,view: 'number', type: 'number',dictCode: 'sex',},
  birthDate: {title: '出生日期',order: 2,view: 'date', type: 'string',},
  phone: {title: '联系电话',order: 3,view: 'text', type: 'string',},
  ageInMonths: {title: '宝贝年龄',order: 4,view: 'text', type: 'string',},
  address: {title: '家庭住址',order: 5,view: 'text', type: 'string',},
  remark: {title: '备注',order: 6,view: 'textarea', type: 'string',},
};
